<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if (!function_exists('make_filesize_readable'))
{
	function make_filesize_readable($size) {
		
		$postfix = 'bytes';
		
		if ($size > 1024) {
			$size /= 1024;
			$postfix = 'KiB';
		}
		
		if ($size > 1024) {
			$size /= 1024;
			$postfix = 'MiB';
		}
		
		$size = round($size, 2);
		
		return $size . ' ' . $postfix;
	}
}